import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '@/views/Home.vue';
import Maintenance from '@/views/Home/Maintenance.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home,
    redirect: '/home/equipment_maintenance_plan',
    children: [
      {
        path: '/home/equipment_maintenance_plan',
        component: Maintenance,
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;

// router.$addRoutes = (params) => {
//   router.matcher = new VueRouter({ mode: 'history' }).matcher;
//   router.addRoutes(params);
// };
